#if !defined(___MAIN_C)
#define ___MAIN_C
#include "std.h"


static xx help(xx)
{ puts("Args: -1|-2 ...");
  puts("  -1:bmp2jpg:");
  opts1(prg,0,NULL);
  puts("  -2:jpg2bmp:");
  opts2(prg,0,NULL);
}
int main(int argc,char **argv)
{ N4 i; char **ss=argv;
  if (!prg) ERR1("Error: main: NULL prg",0ul);

  if (argc==1)
  { help(); return (0); }
  for (++argv,i=1;i<argc;++i)
  { Str s1=*(argv++);
    if (s1[0]!='-') continue;
    switch (s1[1])
    { case '1':
        return (jpeg1a(argc,ss));
      case '2':
        return (jpeg2a(argc,ss));
      default:
        help(); return (0);
    }
  }
  return (0);
}


#endif
